package com.towexin.application.system.domain;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiParam;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * TODO
 *
 * @author Towexin
 * @version 1.0
 * @date 2021/4/27 11:24
 */
@Data
@TableName("t_file_upload")
public class FileUpload implements Serializable {
    private static final long serialVersionUID = -5240623692288223631L;

    @ApiParam(value = "id")
    @TableId(type = IdType.ASSIGN_UUID)
    private String id;

    @ApiParam(value = "文件名")
    @TableField(insertStrategy = FieldStrategy.NOT_NULL)
    private String fileName;

    @ApiParam(value = "文件后缀")
    @TableField(insertStrategy = FieldStrategy.NOT_NULL)
    private String fileType;

    @ApiParam(value = "文件大小")
    @TableField(insertStrategy = FieldStrategy.NOT_NULL)
    private Long fileSize;

    @ApiParam(value = "文件路径, 系统指定")
    @TableField(insertStrategy = FieldStrategy.NOT_NULL, select = false)
    private String filePath;

    @ApiParam(value = "文件流类型")
    @TableField(insertStrategy = FieldStrategy.NOT_NULL)
    private String contentType;

    @ApiParam(value = "上传用户, 系统指定")
    @TableField(insertStrategy = FieldStrategy.NOT_NULL, select = false)
    private String uploadUser;

    @ApiParam(value = "创建时间，系统赋值")
    @TableField(fill = FieldFill.INSERT, insertStrategy = FieldStrategy.NOT_NULL)
    private Date createdTime;
}
